<template>
	<view>
		<!-- 循环字符串数组 -->
		<view class="" v-for="(item,index) in users">
			{{index}} -- {{item}}
		</view>
		
		<!-- 循环对象数组 -->
		<view class="" v-for="(item,index) in city">
			{{index}}--{{item.name}}--{{item.distance}}
		</view>
		
		<!-- 循环对象 -->
		<view v-for="(item,index) in user">
			{{index}}--{{item}}
		</view>
		
		<!-- 循环字符串:item代表字符串中的每一个字符 -->
		<view v-for="(item,index) in username">
			{{index}}---{{item}}
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				users:['八戒','悟空','唐僧','沙和尚'],
				city:[
					{name:"北京",distance:200},
					{name:"上海",distance:100},
					{name:"广州",distance:260},
					{name:"杭州",distance:350}
				],
				user:{name:"张三",age:21},
				username:"张三丰"
				
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
